﻿using OpenRPA.Interfaces;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace OpenRPA.Views
{
    /// <summary>
    /// Interaction logic for RunPlugins.xaml
    /// </summary>
    public partial class RecorderPlugins : UserControl
    {
        public RecorderPlugins()
        {
            InitializeComponent();
            DataContext = this;
        }
        public List<IRecordPlugin> recorderPlugins
        {
            get
            {
                var result = new List<IRecordPlugin>();
                foreach(var p in Plugins.recordPlugins)
                {
                    try
                    {
                        if (p.editor != null) result.Add(p);
                    }
                    catch (Exception ex)
                    {
                        Log.Error("Error getting ui for " + p.Name + ": " + ex, ToString());
                    }
                }
                return result;
            }
        }

    }
}
